#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
   int n;
    cin>>n;
    int a[10][10]={0};
    for(int i = 0; i<n; i++)
    {
        for(int j = 0; j<=i; j++)
        {
            if(j == 0 || i==j)
                a[i][j] = 1;
            else
                a[i][j] = a[i-1][j-1] + a[i-1][j];
        }
    }
    for(int i = 0; i<n; i++)
    {
        for(int k = 0; k<n-i-1; k++)
            cout<<" ";
        for(int j = 0; j<=i; j++)
        {
            cout<<setw(4)<<a[i][j];
        }
        cout<<endl;
    }
    
}